package com.nstar.model.orderexpress;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Set;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="order_menu"
 *     
*/
public class OrderMenu implements Serializable {

    /** identifier field */
    private String menuId;

    /** persistent field */
    private String name;

    /** nullable persistent field */
    private String menuDesc;

    /** persistent field */
    private BigDecimal price;

    /** nullable persistent field */
    private String howToDo;

    /** nullable persistent field */
    private byte[] image;

    /** nullable persistent field */
    private String remarks;

    /** persistent field */
    private com.nstar.model.orderexpress.FoodType foodType;

    /** persistent field */
    private Set menu2Rests;

    /** full constructor */
    public OrderMenu(String menuId, String name, String menuDesc, BigDecimal price, String howToDo, byte[] image, String remarks, com.nstar.model.orderexpress.FoodType foodType, Set menu2Rests) {
        this.menuId = menuId;
        this.name = name;
        this.menuDesc = menuDesc;
        this.price = price;
        this.howToDo = howToDo;
        this.image = image;
        this.remarks = remarks;
        this.foodType = foodType;
        this.menu2Rests = menu2Rests;
    }

    /** default constructor */
    public OrderMenu() {
    }

    /** minimal constructor */
    public OrderMenu(String menuId, String name, BigDecimal price, com.nstar.model.orderexpress.FoodType foodType, Set menu2Rests) {
        this.menuId = menuId;
        this.name = name;
        this.price = price;
        this.foodType = foodType;
        this.menu2Rests = menu2Rests;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *             type="java.lang.String"
     *             column="MENU_ID"
     *         
     */
    public String getMenuId() {
        return this.menuId;
    }

    public void setMenuId(String menuId) {
        this.menuId = menuId;
    }

    /** 
     *            @hibernate.property
     *             column="NAME"
     *             length="100"
     *             not-null="true"
     *         
     */
    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    /** 
     *            @hibernate.property
     *             column="MENU_DESC"
     *             length="200"
     *         
     */
    public String getMenuDesc() {
        return this.menuDesc;
    }

    public void setMenuDesc(String menuDesc) {
        this.menuDesc = menuDesc;
    }

    /** 
     *            @hibernate.property
     *             column="PRICE"
     *             length="6"
     *             not-null="true"
     *         
     */
    public BigDecimal getPrice() {
        return this.price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    /** 
     *            @hibernate.property
     *             column="HOW_TO_DO"
     *             length="255"
     *         
     */
    public String getHowToDo() {
        return this.howToDo;
    }

    public void setHowToDo(String howToDo) {
        this.howToDo = howToDo;
    }

    /** 
     *            @hibernate.property
     *             column="IMAGE"
     *             length="2147483647"
     *         
     */
    public byte[] getImage() {
        return this.image;
    }

    public void setImage(byte[] image) {
        this.image = image;
    }

    /** 
     *            @hibernate.property
     *             column="REMARKS"
     *             length="200"
     *         
     */
    public String getRemarks() {
        return this.remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    /** 
     *            @hibernate.many-to-one
     *             not-null="true"
     *            @hibernate.column name="FOOD_TYPE_ID"         
     *         
     */
    public com.nstar.model.orderexpress.FoodType getFoodType() {
        return this.foodType;
    }

    public void setFoodType(com.nstar.model.orderexpress.FoodType foodType) {
        this.foodType = foodType;
    }

    /** 
     *            @hibernate.set
     *             lazy="true"
     *             inverse="true"
     *             cascade="none"
     *            @hibernate.collection-key
     *             column="MENU_ID"
     *            @hibernate.collection-one-to-many
     *             class="com.nstar.model.orderexpress.Menu2Rest"
     *         
     */
    public Set getMenu2Rests() {
        return this.menu2Rests;
    }

    public void setMenu2Rests(Set menu2Rests) {
        this.menu2Rests = menu2Rests;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("menuId", getMenuId())
            .toString();
    }

}
